<div class="article-item">
  <% if (user && user.privilege == 1) {%>
  <a href="javascript:;" data-title="<%= article.title %>" class="delete-btn icon icon-trash" data-url="<%= article.path + article._id + '/remove' %>"></a>
  <%}%>
  <div class="article_other-info">
    <a href="javascript:;" class="article_avatar">
      <% if (article.avatar)  { %>
      <img src="<%= article.avatar %>" alt="<%= article.author || '无名' %>">
      <% } else {%>
        <%- article.author ? article.author.substr(0,1) : '<span class="icon icon-user"></span>' %>
      <% } %>
    </a>
    <span class="article_author"><%= article.author || '无名' %></span>
    <span class="article_date"><%= article.created_at %></span>
    <span class="article_hot icon icon-fire"><%= article.pv %>℃</span>
  </div>
  <% if (article.img) {%>
  <a class="article-item-inner with-img" href="<%- article.path  + article._id %>">
    <h3 class="article_title"><%- article.title %></h3>
    <div class="article_text"><%- article.content %></div>
    <div class="article_img"><%- article.img %></div>
    <% if (article.tag.length > 0) {%>
    <div class="article_tags">
    <% article.tag.forEach(function(tg){ %>
      <span class="article_tag"><%= tg %></span>
    <% }) %>
    </div>
    <%}%>
  </a>
  <% } else { %>
  <a class="article-item-inner" href="<%- article.path  + article._id %>">
    <h3 class="article_title"><%- article.title %></h3>
    <div class="article_text"><%- article.content %></div>
    <% if (article.tag.length > 0) {%>
    <div class="article_tags">
    <% article.tag.forEach(function(tg){ %>
      <span class="article_tag"><%= tg %> </span>
    <% }) %> 
    </div>
    <%}%>
  </a>
  <% } %>
</div>
